package com.big.model.model.order;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@ApiModel(value = "订单")
@TableName("merchandise_order")
public class MerchandiseOrder {

    @ApiModelProperty(value = "订单流水号")
    @TableField("d_id")
    private String dId;

    @ApiModelProperty(value = "件数")
    @TableField("d_piece")
    private Integer dPiece;

    @ApiModelProperty(value = "用户编号")
    @TableField("p_id")
    private Long pId;


    @ApiModelProperty(value = "收货地址编号")
    @TableField("a_id")
    private Long aId;

    @ApiModelProperty(value = "订单状态")
    @TableField("d_status")
    private String dStatus;

    @ApiModelProperty(value = "金额")
    @TableField("d_total")
    private Double dTotal;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除(1:已删除，0:未删除)")
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "其他参数")
    @TableField(exist = false)
    private Map<String,Object> param = new HashMap<>();


}
